<?php
    // 这个借口用户向用户表中添加新用户

    include_once '../../fn.php';

    $email = $_POST['email'];
    $slug = $_POST['slug'];
    $nickname = $_POST['nickname'];
    $password = $_POST['password'];

    // 构建数据库执行串
    $sql = "insert into users (slug,email,password,nickname,avatar,status) VALUES('$slug','$email','$password','$nickname','uploads/dog.jpg','activated');";

    $result = my_exec($sql);

    echo json_encode($result);

?>